package com.heima.api;

import com.heima.api.fallback.ArticleClientFallback;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article",
fallbackFactory = ArticleClientFallback.class)
public interface ArticleClient {
    @PostMapping("/api/v1/article/save")
    public ResponseResult submitArticle(@RequestBody ArticleDto articleDto);
}
